package handlers

import (
	"context"

	pb "gokit_study/protos"
)

// NewService returns a naïve, stateless implementation of Service.
func NewService() pb.UserServer {
	return userService{}
}

type userService struct{}

func (s userService) GetUserInfo(ctx context.Context, in *pb.GetUserInfoRequest) (*pb.UserInfo, error) {
	var resp pb.UserInfo
	resp.UserId = 1
	resp.Address = "hebei"
	resp.UserName = "wangzhihui"
	return &resp, nil
}

func (s userService) SetUserInfo(ctx context.Context, in *pb.SetUserInfoRequest) (*pb.UserInfo, error) {
	var resp pb.UserInfo
	return &resp, nil
}
